<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link rel=stylesheet type="text/css" href="css/main.css">
<link rel=stylesheet type="text/css" href="css/introduction.css">
<link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon" />
<title>教會相簿</title>
</head>
<body background="img/background_color.gif">
<?php 
include("Top.php"); 
include("menu.php"); 
?>
<table cellpadding="0" cellspacing="0" width="100%" background="img/background_color.gif" >
  <tr>
    <td>
    <table cellpadding="0" cellspacing="0" width="1000" background="img/context_background.gif" align="center">
      <tr valign="top">
        <td align="left" height="25">
        </td>
      </tr>
      <tr>
        <td align="center">
        <table cellpadding="0" cellspacing="0" width="900">
          <tr valign="top">
            <td align="left">
            <img src="img/albums_title.jpg" border="0" />
            </td>
          </tr>
        </table>
        </td>
      </tr>
      <tr>
        <td align="center">
        <table cellpadding="0" cellspacing="0" width="900" class="albumscontenttable">
          <tr>
          <?php
		  require_once("class/PhotoFunction.php");
		  $photoobject = new Photo('./albums');
		  $photoFolderNames = $photoobject->getPhotoFile();
		  for($i=0; $i<count($photoFolderNames); $i++){
		    if (($i+1)%4==0){
				echo "<td align='center'>
                        <table width='200' class='albumstable'>
                          <tr>
                            <td align='center'>
							  <a href='albums_pic.php?album=" . $photoFolderNames[$i][0] . "'><img src=" . $photoFolderNames[$i][1] . " width='150' height='100' border='0' /></a>
                            </td>
                          </tr>
                          <tr>
                            <td align='center'>
							  ". $photoFolderNames[$i][0] . "
                            </td>
                          </tr>
                          <tr>
                            <td height='10' align='center'>
                            </td>
                          </tr>
                        </table>
                      </td>
					  </tr>
					  <tr>
				      ";
			}else{
				echo "<td align='center'>
                        <table width='200' class='albumstable'>
                          <tr>
                            <td align='center'>
							  <a href='albums_pic.php?album=" . $photoFolderNames[$i][0] . "'><img src=" . $photoFolderNames[$i][1] . " width='150' height='100' border='0' /></a>
                            </td>
                          </tr>
                          <tr>
                            <td align='center'>
							   ". $photoFolderNames[$i][0] . "
                            </td>
                          </tr>
                          <tr>
                            <td height='10' align='center'>
                            </td>
                          </tr>
                        </table>
                      </td>";
			}
		  }
		  ?>
          </tr>
        </table>
        </td>
      </tr>
      <tr>
        <td height="25" align="left">
        </td>
      </tr>
    </table>
    </td>
  </tr>
</table>
<?php 
include("Footer.php"); 
?>
</body>
</html>
